/**
 * Created by fangshufeng on 2018/2/28.
 */


import React from 'react'

import {Button, List} from 'antd';

import  InfiniteScroll from 'react-infinite-scroller'

export default class TestView extends React.Component {

    render(){
        return <div style={{
            borderWidth: 3,
            borderColor: "#92cdec",
            borderStyle: 'solid',
            borderRadius: 4,
            overflow: 'auto',
            height: 100,
            marginTop: 15,
            ...this.props.style
        }}>

            <InfiniteScroll
                initialLoad={false}
                pageStart={0}
                loadMore={false}
                hasMore={false}
                useWindow={false}
            >
                <List
                    dataSource={this.props.dataSource}
                    renderItem={(item, index) => (this.props.renderItem(item,index))}
                >
                </List>
            </InfiniteScroll>
        </div>
    }
}